#ifndef IVFRAME_H
#define IVFRAME_H

#include <wx/image.h>

//(*Headers(IVFrame)
#include <wx/scrolwin.h>
#include <wx/menu.h>
#include <wx/frame.h>
#include <wx/statusbr.h>
//*)

class IVFrame: public wxFrame
{
	public:

		IVFrame(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
		virtual ~IVFrame();

		//(*Declarations(IVFrame)
		wxMenu* IVOperateMenu;
		wxMenuItem* IVImageEnlarge;
		wxScrolledWindow* IVScrolledWindow;
		wxMenuBar* IVMenuBar;
		wxStatusBar* IVStatusBar;
		wxMenuItem* IVImageShrink;
		//*)

	protected:

		//(*Identifiers(IVFrame)
		static const long ID_IVSCROLLEDWINDOW;
		static const long ID_IVSTATUSBAR;
		static const long ID_IVFILEOPEN;
		static const long ID_IVFILECLOSE;
		static const long ID_IVFILESAVE;
		static const long ID_IVFRAMEEXIT;
		static const long ID_IVIMAGEENLARGE;
		static const long ID_IVIMAGESHRINK;
		static const long ID_IVIMAGEREVERSE;
		static const long ID_IVIMAGEGREYSCALE;
		static const long ID_IVIMAGEROTATECLOCKWISE;
		static const long ID_IVIMAGEROTATEUNCLOCKWISE;
		static const long iD_IVIMAGEROTATE;
		//*)

	private:
        wxImage *IVImage;
        wxImage *IVImageBK;
        double IVScaleCoefficient;

		//(*Handlers(IVFrame)
		void OnIVScrolledWindowPaint(wxPaintEvent& event);
		void OnIVImageReverseSelected(wxCommandEvent& event);
		void OnIVImageGreyscaleSelected(wxCommandEvent& event);
		void OnIVImageRotateClockwiseSelected(wxCommandEvent& event);
		void OnIVImageRotateUnclockwiseSelected(wxCommandEvent& event);
		//*)

        void OnIVFrameExit(wxCommandEvent &event);
        void OnIVFileOpen(wxCommandEvent &event);
        void OnIVFileClose(wxCommandEvent &event);
        void OnIVFileSave(wxCommandEvent &event);
        void OnIVImageEnlarge(wxCommandEvent &event);
        void OnIVImageShrink(wxCommandEvent &event);
        void IVReloadImage(wxString fileName=wxEmptyString);
        void IVFrameInit(void);
        void IVSetOperateValid(bool flag=true);

		DECLARE_EVENT_TABLE()
};

#endif
